<%@page import="java.net.URLDecoder"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@page import="superMarket.*"%>
<%
	String event = request.getParameter("event");
	try{
		if(event.equals("Login")){
			String id_customer = URLDecoder.decode(request.getParameter("id_customer"), "utf-8");
			Dao dao = Dao.getInstance();
			Customer customer = dao.loginCustomer(id_customer);
			if(customer != null){
				out.print(1);
			}
			else{
				out.print(-1);
			}
		}
	}
	catch(Exception e){
		e.printStackTrace();
	}
%>